<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
	<base th:href="${#request.getContextPath()+'/'}">
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="stylesheet" href="layui/css/layui.css"  media="all">
<link rel="Bookmark" href="/favicon.ico" >
<link rel="Shortcut Icon" href="/favicon.ico" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5shiv.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="lib/Hui-iconfont/1.0.8/iconfont.css" />
<link rel="stylesheet" type="text/css" href="h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="h-ui.admin/css/style.css" />
	<link href="lib/icheck/icheck.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<!--/meta 作为公共模版分离出去-->

<title>添加用户</title>
<style type="text/css">
	#province select{margin-right:20px; width:100px;height: 30px}
</style>

</head>
<body>
<article class="page-container">
	<form action="" method="post" class="form form-horizontal" id="form-address">
		<div class="row cl">
			<label class="form-label col-3 col-sm-3"><span class="c-red">*</span>收件人：</label>
			<div class="formControls col-5 col-sm-6">
				<input type="hidden" th:value="${address.addressId}" name="addressId">
				<input type="text" class="input-text" th:value="${address.consignee}" placeholder="" id="consignee" name="consignee"  errormsg="请输入2-6位中文" datatype="/^[\u4E00-\u9FA5\uf900-\ufa2d]{2,6}$/"  nullmsg="姓名不能为空">
			</div>
            <div class="col-4 col-sm-3"></div>
		</div>

		<div class="row cl">
			<label class="form-label col-3 col-sm-3"><span class="c-red">*</span>手机：</label>
			<div class="formControls col-5 col-sm-6">
				<input type="text" class="input-text" th:value="${address.phone}" placeholder="" id="phone" name="phone" datatype="m" errormsg="请输入正确的手机号" nullmsg="手机号不能为空">
			</div>
            <div class="col-4 col-sm-3"></div>
		</div>

		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-3"><span class="c-red">*</span>所在城市：</label>
			<div class="formControls col-xs-5 col-sm-6">
					<div id="province"></div>
            </div>
			<div class="col-4 col-sm-3"><div class="Validform_checktip"></div></div>
		</div>
		<div class="row cl">
			<label class="form-label col-3 col-sm-3"><span class="c-red">*</span>详细地址：</label>
			<div class="formControls col-5 col-sm-6">
				<input type="text" class="input-text" th:value="${address.detailedAddress}" placeholder="" id="detailedAddress" name="detailedAddress" datatype="*" nullmsg="地址不能为空">
			</div>
			<div class="col-4 col-sm-3"></div>
		</div>
		<input type="hidden" name="updateAfterStatusIsDefault" th:value="${address.isDefault}">
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>是否默认：</label>
			<div class="formControls col-xs-8 col-sm-9 skin-minimal">
				<div class="radio-box">
					<input name="isDefault" type="checkbox" value="0" id="sex-1" th:checked="${address.isDefault==0}?true:false">
					<label for="sex-1">默认地址</label>
				</div>
			</div>
		</div>
		<div class="row cl">
			<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
				<input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
			</div>
		</div>
	</form>
</article>

<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="h-ui/js/H-ui.min.js"></script>
<script type="text/javascript" src="h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->

<script type="text/javascript" src="lib/Validform/5.3.2/Validform.min.js"></script>
<!--<script type="text/javascript" src="lib/icheck/jquery.icheck.min.js"></script>-->

<!--请在下方写此页面业务相关的脚本-->
<!--<script type="text/javascript" src="lib/My97DatePicker/4.8/WdatePicker.js"></script>-->
<!--<script type="text/javascript" src="lib/jquery.validation/1.14.0/jquery.validate.js"></script>-->
<!--<script type="text/javascript" src="lib/jquery.validation/1.14.0/validate-methods.js"></script>-->
<!--<script type="text/javascript" src="lib/jquery.validation/1.14.0/messages_zh.js"></script>-->


<script type="text/javascript" src="h-ui/js/H-ui.js"></script>



<script type="text/javascript" src="lib/jquery/provincesData.js"></script>
<script  src="lib/jquery/jquery.provincesCity.js" th:inline="javascript"></script>

<script type="text/javascript" src="h-ui/js/submit_form.js"></script>

<script type="text/javascript" th:inline="javascript">
$(function() {

    $("#form-address").Validform({
        tiptype:2
        ,callback:function(form){ // 表单校验通过后调用这个函数
			console.info("表单校验通过");
            submitForm("order/editAddress","form-address")

            // 如果callback里明确return false，则表单不会提交，如果return true或没有return，则会提交表单
            return false;
        }
    });
});



/*调用插件*/
$(function(){

	var address=Object();
	address.province=[[${address.receivingProvince}]];
	address.city=[[${address.receivingCity}]];
	address.county=[[${address.receivingConty}]];

	$("#province").ProvinceCity(address);

});

</script> 

</body>
</html>